package com.example.feigin;


import com.example.Service.RedisService;
import com.example.fanqie.entity.Novel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@Component
public class OtherActionHystrix implements OtherAction {
    @Autowired
    private RedisService redisService;

    @Override
    public Object selectlist(@RequestBody Novel novel) {
        Map<String, Object> novellist = redisService.getEntireHashFromRedis("novellist");
        System.out.println("=============");
        System.out.println(novellist);
        return novellist;
    }
}